lib/repo: Support hardlink conversions from bare-user to bu-only
authorColin Walters <walters@verbum.org>
Mon, 12 Jun 2017 17:59:33 +0000 (13:59 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 13 Jun 2017 12:02:12 +0000 (12:02 +0000)
commit74e3581ed674746d03e8a0e0af332b10de26963f
tree600183fec1b040b1561dae4d4abf7a597357ed3d
parentb614c65eabc416458dc7d27f8339f84091f68ad2
lib/repo: Support hardlink conversions from bare-user to bu-only

Thinking about the problem of flatpak converting from `bare-user` to `bare-user-only`
"in place" by creating a new repo and doing a `pull-local`, I realized
that we can optimize this process by doing hardlinks for both metadata
and regular files.  The repo formats are *almost* compatible, the
exception being symlinks.

An earlier patch caused us to do hardlinks for metadata, this patch takes things
to the next step and special cases this specific conversion. In this case we
need to parse the source object to determine whether or not it's a symlink.

Closes: #922
Approved by: alexlarsson
src/libostree/ostree-repo.c
tests/libtest.sh
tests/test-basic-user-only.sh